package com.ideheima.Object;

import cn.hutool.core.util.ObjectUtil;

public class Test {
    public static void main(String[] args) {
        Pig pig = new Pig("小花", 2, "女");
        Pig pig1 = new Pig("小花", 2, "女");


        if (pig.equals(pig1)){
            System.out.println("相同");
        } else{
            System.out.println("不相同");
        }

        System.out.println("==========");


        if (ObjectUtil .equals(pig, pig1)){
            System.out.println("相同");
        }else {
            System.out.println("不相同");
        }
    }
}
